<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
       /* .child{
            background: greenyellow;
            width: 200px;
            height: 200px;
            line-height: 200px;
        }*/
       /* .child{
            background: greenyellow;
            width: 200px;
            height: 200px;
            margin: 0 auto;
        }*/
        .child{
            background: greenyellow;
            width: 200px;
            height: 200px;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-top: -100px;
            margin-left: -100px;


        }
    </style>
</head>
<body>
<div class="parent">
<div class="child">Text here</div>
</div>
</body>
</html>